package com.audiobo.recorder;

import java.awt.Color;
import java.awt.Graphics;
import java.io.PrintStream;
import javax.imageio.ImageIO;

// Referenced classes of package com.audiobo.recorder:
//            VUView

class VUInlineView extends VUView {

  VUInlineView() {
    barCount = 1;
    maxBarHeight = 100D;
  }

  protected void getResources() {
    try {
      colourFillImage = ImageIO.read(getClass().getClassLoader().getResource(
          "resources/VUView/singleBarFill.png"));
    } catch (Exception exception) {
      System.err.println((new StringBuilder())
          .append("exception downloading VUView resources ").append(exception)
          .toString());
    }
  }

  protected Color bgColor() {
    return new Color(226, 227, 231, 255);
  }

  protected double barHeightFunction(int i, double d, double d1, double d2) {
    d1 = Math.pow(d1, 0.69999999999999996D);
    double d3 = (double) Math.round(d1 * 10D) / 10D;
    return d3 * maxBarHeight;
  }

  protected double lowPassFilterFunction(int i, double d, double d1) {
    return d1;
  }

  protected double constrainFunction(double d, double d1, double d2) {
    return d;
  }

  protected void drawBar(Graphics g, int i) {
    int l = 32 * i;
    int i1 = l + 32;
    int j = (int) barHeights[i];
    int k = 0;
    g.drawImage(colourFillImage, j, l, k, i1, j, l, k, i1, null);
  }
}
